package com.zs.lib_base.common

import android.Manifest
import com.zs.lib_base.BuildConfig
import com.zs.lib_base.bean.InterestListBean
import com.zs.lib_base.bean.UserBaseInfo


class Constants {
    companion object {

        var userBaseInfo: UserBaseInfo?=null
        private val debug by lazy { BuildConfig.DEBUG }
        val version = "2.5.1"

        val closePushUrl by lazy { "closePushUrl" } //关闭 推送标签

        val pushUrl by lazy { "develop" } //测试 推送地址
//        val pushUrl by lazy { "jwell56_steel_index" } //线上
//        val url by lazy { if (debug) "http://10.130.0.174:8088" else "https://index.jwell56.com" }

//        var url = "https://index.jwell56.com" //线上环境
//        var h5_baseurl = "http://m.index.jwell56.com" //线上环境

        var url = "https://usteel.jwell56.com" //预生产
        var h5_baseurl = "https://usteel.jwell56.com" //预生产

//        var url = "http://10.0.60.69:8088" //测试
//        var h5_baseurl = "http://10.0.60.69:8088/opt" //测试

//        var url = "http://10.130.0.174:8088" //金贸测试
//        var h5_baseurl = "http://10.130.0.174:8088/opt" //金贸测试

        val host by lazy { "xn" } //正式 预生产
//      val host by lazy { "web" } //测试

        var h5_url = "${h5_baseurl}/jwwl-xngt-merchat" //线上h5环境
//         var h5_url = "${h5_baseurl}/opt/jwwl-xngt-merchat" //开发h5环境


//        val url by lazy { "http://10.130.0.174:8088" } //测试


//        val share_ip_url by lazy { "http://10.130.0.87:8084" } //预生产ip分享地址

//        val url by lazy { "http://10.130.0.87:8084" } //预生产
//        val host by lazy { "xn" }//预生产


        //         val host by lazy { if (debug) "web" else "xn" }

        val BASE_URL  by lazy {"$url/bos-$host/api/$version/"}


        val DIALOG_IN_TIME: Long = 400 //dialog进入动画时间
        val JS = """<head>
<meta name="viewport" content="width=device-width, user-scalable=no" />
<style>p{margin:0}img{max-width: 100%; width:auto; height:auto;}</style>
</head>"""

        val erCodeUrl = "http://m.index.jwell56.com/jwwl-xngt-ui/templates/newOrderH5/new-download/new-download.html"

        //打卡活动详情
        val clockDetailUrl = "${h5_url}/#/pages/check-activity/detail"
        //我的打卡进程
        val myClockUrl = "${h5_url}/#/pages/check-activity/check-in-modal"

        val maxDetail = 62 //详情最大显示字数
        val maxComment = 58 //一级评论最大字数
        val maxLevelComment = 38 //二级评论

        var shareId = "0" //转发分享的id
        var shareType = "1" //转发分享的type
        var isInitMessage = false
        var searchContactList:MutableList<String> = mutableListOf()
        var letterList:MutableList<String> = mutableListOf("A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","#")
        var mSelectedList:MutableList<InterestListBean.Data> = mutableListOf() //我的兴趣
        var chatClickImagePath:String ?= null
        var addMapDefaultBg1 = "/opt/image/d877d47711c9494180fe77ec14c0a668.png" //添加地图默认背景
        var addMapDefaultBg2 = "/opt/image/439579edf0d149c1bad78c16139db9d7.png"
        var longitude = 0.0
        var latitude = 0.0
        var shareWxRewardId = "" //转发微信奖励id
        var shareWxRewardType = ""//转发微信奖励type
        var pushTag = "xnzsPush"//推送标签

        /**
         * 友盟
         */
        const val um_appKey = "5d0b2e4c0cafb2605f000481"//友盟key
        const val um_channel = "JWell"//友盟


        const val PERMISSIONCODE = 100
        val dynaPermissions by lazy {
            arrayListOf(
                Manifest.permission.CAMERA
            )
        }

    }
}